package com.ruoyi.produce.base.bom.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.machine.base.device.domain.Device;
import com.ruoyi.produce.base.mould.domain.Mould;
import com.ruoyi.produce.base.procedure.domain.Procedure;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;
import java.util.List;

/**
 * 产品BOM表
 * produce_bom
 * produce_bom_child BOM子件表，储存子件信息
 * produce_bom_procedure 产品工序表，储存产品所需工序信息
 * produce_bom_machine
 * @author Drj 2021/6/28
 */
public class Bom extends BaseEntity {
    /**
     * 产品编号
     */
    @NotNull(message = "产品编号不能为空")
    @ApiModelProperty(value = "产品编号", required = true)
    private String produceId;

    /**
     * 父ID
     */
    @ApiModelProperty(value = "父ID")
    private String produceIdParent;
    /**
     * 类别编号
     */
    @Excel(name = "类别编号")
    private String baseCategoryId;
    /**
     * 类别名称
     */
    @Excel(name = "类别名称")
    private String baseCategoryName;
    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String produceName;
    /**
     * 计量单位编号
     */
    @Excel(name = "计量单位编号")
    private String baseUnitId;
    /**
     * 计量单位名称
     */
    @Excel(name = "计量单位名称")
    private String baseUnit;
    /**
     * 产品规格
     */
    @Excel(name = "产品规格")
    private String produceSpecs;
    /**
     * 单位子件所需数量
     */
    private double numberRequire;
    /**
     * 单位子件损耗
     */
    private double produceLoss;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private java.sql.Timestamp createTime;
    /**
     * 备注
     */
    private String remarks;
    /**
     * 工序
     */
    private List<Procedure> procedureList;
    /**
     * 库存数量
     */
    @Excel(name = "库存数量")
    private Double produceNumber;
    /**
     * 子件产品
     */
    private List<Bom> produceChild;
    /**
     * 对应模具
     */
    private List<Mould> mouldList;
    /**
     * 对应加工设备
     */
    private List<ProductionMachine> deviceList;
    /**
     * 删除标志
     */
    private String deleteFlag;

    @Override
    public String toString() {
        return "Bom{" +
                "produceId='" + produceId + '\'' +
                ", produceIdParent='" + produceIdParent + '\'' +
                ", baseCategoryId='" + baseCategoryId + '\'' +
                ", baseCategoryName='" + baseCategoryName + '\'' +
                ", produceName='" + produceName + '\'' +
                ", baseUnitId='" + baseUnitId + '\'' +
                ", baseUnit='" + baseUnit + '\'' +
                ", produceSpecs='" + produceSpecs + '\'' +
                ", numberRequire=" + numberRequire +
                ", produceLoss=" + produceLoss +
                ", createTime=" + createTime +
                ", remarks='" + remarks + '\'' +
                ", procedureList=" + procedureList +
                ", produceNumber=" + produceNumber +
                ", produceChild=" + produceChild +
                ", mouldList=" + mouldList +
                ", deviceList=" + deviceList +
                ", deleteFlag='" + deleteFlag + '\'' +
                '}';
    }

    public String getProduceId() {
        return produceId;
    }

    public void setProduceId(String produceId) {
        this.produceId = produceId;
    }

    public String getBaseCategoryId() {
        return baseCategoryId;
    }

    public void setBaseCategoryId(String baseCategoryId) {
        this.baseCategoryId = baseCategoryId;
    }

    public String getBaseCategoryName() {
        return baseCategoryName;
    }

    public void setBaseCategoryName(String baseCategoryName) {
        this.baseCategoryName = baseCategoryName;
    }

    public String getProduceName() {
        return produceName;
    }

    public void setProduceName(String produceName) {
        this.produceName = produceName;
    }

    public String getBaseUnitId() {
        return baseUnitId;
    }

    public void setBaseUnitId(String baseUnitId) {
        this.baseUnitId = baseUnitId;
    }

    public String getBaseUnit() {
        return baseUnit;
    }

    public void setBaseUnit(String baseUnit) {
        this.baseUnit = baseUnit;
    }

    public String getProduceSpecs() {
        return produceSpecs;
    }

    public void setProduceSpecs(String produceSpecs) {
        this.produceSpecs = produceSpecs;
    }

    public double getNumberRequire() {
        return numberRequire;
    }

    public void setNumberRequire(double numberRequire) {
        this.numberRequire = numberRequire;
    }

    public double getProduceLoss() {
        return produceLoss;
    }

    public void setProduceLoss(double produceLoss) {
        this.produceLoss = produceLoss;
    }

    @Override
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public List<Procedure> getProcedureList() {
        return procedureList;
    }

    public void setProcedureList(List<Procedure> procedureList) {
        this.procedureList = procedureList;
    }

    public List<Bom> getProduceChild() {
        return produceChild;
    }

    public void setProduceChild(List<Bom> produceChild) {
        this.produceChild = produceChild;
    }

    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public String getProduceIdParent() {
        return produceIdParent;
    }

    public void setProduceIdParent(String produceIdParent) {
        this.produceIdParent = produceIdParent;
    }

    public Double getProduceNumber() {
        return produceNumber;
    }

    public void setProduceNumber(Double produceNumber) {
        this.produceNumber = produceNumber;
    }

    public List<ProductionMachine> getDeviceList() {
        return deviceList;
    }

    public void setDeviceList(List<ProductionMachine> deviceList) {
        this.deviceList = deviceList;
    }

    public List<Mould> getMouldList() {
        return mouldList;
    }

    public void setMouldList(List<Mould> mouldList) {
        this.mouldList = mouldList;
    }
}
